The Repeated Demise of Logic Programming and Why It Will Be Reincarnated
نویسنده
چکیده
Logic Programming is the proposal to implement systems using mathematical logic. Perhaps the first published proposal to use mathematical logic for programming was John McCarthy’s Advice Taker paper. Planner was the first language to feature ''procedural plans'' that were called by ''pattern-directed invocation'' using ''goals'' and ''assertions''. A subset called Micro Planner was implemented by Gerry Sussman, Eugene Charniak and Terry Winograd and was used in Winograd's natural-language understanding program SHRDLU, Eugene Charniak's story understanding work, and some other projects. This generated a great deal of excitement in the field of AI. It also generated controversy because it proposed an alternative to the logic approach that had been one of the mainstay paradigms for AI. The question arose as what the difference was between the procedural and logical approaches. It took several years to answer this question. The upshot is that the procedural approach has a different mathematical semantics (based on the denotational semantics of the Actor model) from the semantics of mathematical logic. There were some surprising results from this research including that mathematical logic is incapable of implementing general concurrent computation even though it can implement sequential computation and some kinds of parallel computation including the lambda calculus. Also along the way a large number of logic programming experiments were carried out although none met with great success. Also classical logic blows up in the face of inconsistent information that is becoming more ubiquitous with the growth of the Internet. Now we are in the midst of a huge paradigm shift to massive concurrency with the advent of Web Services and many-core computer architectures. This paradigm shift enables and requires a new generation of systems incorporating ideas from mathematical logic in their implementation. The result will be that logic programming will be reincarnated. But something is often transformed when reincarnated! Actors Actors are the universal primitives of concurrent digital computation. In response to a message that it receives, an Actor can make local decisions, create more Actors, send more messages, and designate how to respond to the next message received. A Serializer is an Actor that is continually open to the arrival of messages. Messages sent to a Serialize always arrive although delivery can take an unbounded amount of time. (The Actor model can be augmented with metrics.) Unbounded nondeterminism is the property that the amount of delay in servicing a request can become unbounded as a result of arbitration of contention for shared resources while still guaranteeing that the request will eventually be serviced. Arguments for unbounded nondeterminism include the following: • There is no bound that can be placed on how long it takes a computational circuit called an Arbiter to settle. – Arbiters are used in computers to deal with the circumstance that computer clocks operate asynchronously with input from outside, ''e.g..'', keyboard input, disk access, network input, ''etc.'‘ – So it could take an unbounded time for a message sent to a computer to be received and in the meantime the computer could traverse an unbounded number of states. • Electronic mail enables unbounded nondetermism since mail can be stored on servers indefinitely (perhaps the server is down temporarily) before being delivered. • Communication links to servers on the Internet can be out of service indefinitely. Actor Programming Language Semantics Actors can be used to define the semantics of concurrent programming languages. Actor script semantics Actor script semantics are defined by the behavior of Actors that serve as the script elements of an Actor programming language. For example consider the following concurrent programming language in which each is one of the following kinds: When Communication[Eval[environment] customer] is received, send environment Communication[lookup[]customer] send When Communication[Eval[environment] customer] is received, send Communication[Eval[environment] customer’] where customer’ is a new Actor such that when customer’ receives the communication r, then send Communication[Eval[environment] customer’’] where customer’’ is a new actor such that when customer’’ receives the communication c, then send r c . When Communication[Eval[environment] customer] is received, send Communication[Eval[environment] customer’] such that when customer’ receives the communication r, then send Communication[Eval[environment] customer’’] such that when customer’’ receives the communication m, then send r Communication[m, customer] receiver i i When Communication[Eval[environment] customer] is received, send customer a new actor r such that when r receives a communication com, then try environment.bind[i com] and 1. if a new environment’ is created send i Communication[Eval[environment’]] 2. otherwise try i+1 behavior i i When Communication[Eval[environment] customer] is received, send customer a new actor r such that when r receives Communication[message customer’], then try environment.bind[i message] and 1. if a new environment’ is created send i Communication[Eval[environment’] customer’] 2. otherwise try i+1 {, } When Communication[Eval[environment] customer] is received, send Communication[Eval[environment]] and concurrently send Communication[Eval[environment] customer] let = in When message[Eval[environment] customer] is received, then create a new environment’ by environment.bind[ .Eval[environment]] and send Communication[Eval[environment’] customer] serializer When Communication[Eval[environment] customer] is received, then send customer a new actor s such that communications sent to s are processed in FIFO order with a behavior Actor that is initially .Eval[environment] and: When communication com is received by S, then send the behavior Actor Communication[com customer’] where customer’ is a new actor such that when it receives an Actor then it is used as the behavior Actor for the next communication received by S. Example Actor script An example Actor script for a simple storage cell that can contain any Actor address is as follows: Cell ≡ receiver Communication[Create[initial] customer] send customer serializer readWrite(initial)} The above script which creates a storage cell makes use of the behavior readWrite which is defined as follows: readWrite(contents) ≡ behavior Communication[read[] customer] {send customer contents, readWrite(contents)} Communication[write[x] customer] {send customer x, readWrite(x)} For example the following expression creates a cell x with initial contents 5 and then concurrently writes to it with the values 7 and 9. let x = Cell.Create[5] in {x.write[7], x.write[9], x.read[]} The value of the above expression is either 7 or 9. A Limitation of Logic Programming In his 1988 paper on the early history of Prolog, Bob Kowalski published the thesis that “computation could be subsumed by deduction” and quoted with approval “Computation is controlled deduction.” which he attributed to Pat Hayes. Contrary to Kowalski and Hayes, Hewitt's thesis was that logical deduction was incapable of carrying out concurrent computation in open systems because of indeterminacy in the arrival order of messages. Indeterminacy in Concurrent Computation Hewitt [1985], Hewitt and Agha [1991], and other published work argued that mathematical models of concurrency did not determine particular concurrent computations as follows: The Actor model makes use of arbitration for determining which message is next in the arrival ordering]of an Actor that is sent multiple messages concurrently. For example Arbiters can be used in the implementation of the arrival ordering of an Actor which is subject to physical indeterminacy in the arrival order. In concrete terms for Actor systems, typically we cannot observe the details by which the arrival order of messages for an Actor is determined. Attempting to do so affects the results and can even push the indeterminacy elsewhere. Instead of observing the internals of arbitration processes of Actor computations, we await outcomes. Physical indeterminacy in arbiters produces indeterminacy in Actors. The reason that we await outcomes is that we have no alternative because of indeterminacy. According to Chris Fuchs [2004], quantum physics is a theory whose terms refer predominately to our interface with the world. It is a theory not about observables, not about beables, but about ‘dingables’ We tap a bell with our gentle touch and listen for its beautiful ring. The semantics of indeterminacy raises important issues for autonomy and interdependence in information. In particular it is important to distinguish between indeterminacy in which factors outside the control of an information system are making decisions and choice in which the information system has some control. It is not sufficient to say that indeterminacy in Actor systems is due to unknown/unmodeled properties of the network infrastructure. The whole point of the appeal to quantum indeterminacy is to show that aspects of Actor systems can be unknowable and the participants can be entangled. Actor Model and Mathematical Logic What does the mathematical theory of Actors have to say about logic programming? A closed system is defined to be one which does not communicate with the outside. Actor model theory provides the means to characterize all the possible computations of a closed Actor system. So mathematical logic can characterize (as opposed to implement) all the possible computations of a closed Actor system. However, this is impossible for an open Actor system S in which the addresses of outside Actors are passed into S in the middle of computations so that S can communicate with these outside Actors. These outside Actors can then in turn communicate with Actors internal to S using addresses supplied to them by S. Prolog-like concurrent message-passing programming languages Keith Clark, Herve Gallaire, Steve Gregory, Vijay Saraswat, Udi Shapiro, Kazunori Ueda, etc. developed a family of Prolog-like concurrent message passing programming languages using unification of shared variables and data structure streams for messages. Claims were made that these languages were based on mathematical logic. This kind of programming language was used as the basis of the Japanese Fifth Generation Project (ICOT). However, the Prolog-like concurrent programming languages (like the Actor model) were based on message passing and consequently were subject to the same indeterminacy. This was the basis of the argument in Carl Hewitt and Gul Agha [1991] that the Prolog-like concurrent programming languages were neither deductive nor logical. Updating the Scientific Community Metaphor The Scientific Community Metaphor paper was published in 1981 by Bill Kornfeld and Carl Hewitt as an approach to understanding |scientific communities by extending pattern directed invocation programming languages that invoke high level procedural plans on the basis of messages, e.g., assertions and goals. Their work built on the philosophy, history and sociology of science with its analysis that scientific research depends critically on monotonicity, concurrency, commutativity, and pluralism to propose, modify, support, and oppose scientific methods, practices, and theories. A programming language named Ether was developed that invokes procedural plans to process goals and assertions concurrently by dynamically creating new rules during program execution. Ether also addressed issues of conflict and contradiction with multiple sources of knowledge and multiple viewpoints. At this point the metaphor needs an update. Some ideas are presented in the sections below. Monotonicity, Concurrency, Commutatvity, Pluralism, Skepticism, and Provenance Scientific communities have characteristics of monotonicity, concurrency, commutativity, pluralism, skepticism, and provenance whose semantics can be studied using the Actor model. Monotonicity. Once something is published it cannot be taken back. Results are published so they are available to a community. Published work is collected and indexed. Retractions can be published in case of error. Publications are sometimes lost or difficult to retrieve. Sometimes it is easier to rederive a result than to look it up. Concurrency. The activities overlap in time. The participants interact with each other by message passing. Resources are limited by including processing, communications, and storage Commutativity. Publications can be read regardless of whether they initiate new research or become relevant to ongoing research. Initiating work on a new scientific raises the question whether the answer has already been published. While working on a project, attention needs to be paid to ongoing developments that can affect the project. The order in which information is received can influence how it is processed. Pluralism. Publications include heterogeneous, overlapping and possibly conflicting information. There is no central arbiter of truth in scientific communities. Scientific fads sometimes sweep up almost everyone in a field. Sponsors can try to control scientific activities. Skepticism. Skepticism is an important commitment of the Scientific Community Metaphor. Great effort is expended to try to undermine current information and replace it with better information. Provenance. The provenance of information is of intense interest in the Scientific Community Metaphor. Viewpoints Ether used viewpoints to modularize information in publications. However a great deal of information is shared across viewpoints. So Ether made use of inheritance so that information in a viewpoint could be readily used in other viewpoints. Sometimes this inheritance is not exact as when the laws of physics in Newtonian mechanics are derived from those of Special Relativity. In such cases Ether used translation instead of inheritance. Imre Lakatos studied very sophisticated kinds of translations of mathematical (e.g., the Euler formula for polyhedra) and scientific theories. Logical Viewpoints (Theories, Context). Viewpoints were used to implement natural deduction (Fitch [1952]) in Ether. In order to prove classically a goal of the form (P implies Q) in a viewpoint V, it is sufficient to create a new viewpoint V' that inherits from V, assert P in V', and then prove Q in V'. An idea like this was originally introduced into programming language proving by Rulifson, Derksen, and Waldinger [1973] except since the Scientific Community Metaphor is concurrent rather than being sequential it does not rely on being in a single viewpoint that can be sequentially pushed and popped to move to other viewpoints. Negotiation Viewpoints. More challenging semantics are processes for negotiation as studied in the sociology and philosophy of science by Michel Callon, Paul Feyerabend, Elihu M. Gerson, Bruno Latour, John Law, Karl Popper, Susan Leigh Star, Anselm Strauss, Lucy Suchman, etc. Observational Viewpoints. According to Relational Quantum Physics [Laudisa and Rovelli 2005], the way distinct physical systems affect each other when they interact (and not of the way physical systems "are") exhausts all that can be said about the physical world. The physical world is thus seen as a net of interacting components, where there is no meaning to the state of an isolated system. A physical system (or, more precisely, its contingent state) is reduced to the net of relations it entertains with the surrounding systems, and the physical structure of the world is identified as this net of relationships. In other words, “Quantum physics is the theoretical formalization of the experimental discovery that the descriptions that different observers give of the same events are not universal.” The concept that quantum mechanics forces us to give up is: the description of a system independent from the observer providing such a description; that is the concept of the absolute state of a system. I.e., there is no observer independent data at all. According to Zurek [1982], “Properties of quantum systems have no absolute meaning. Rather they must be always characterized with respect to other physical systems.” Does this mean that there is no relation whatsoever between views of different observers? Certainly not. According to Rovelli [1996] “It is possible to compare different views, but the process of comparison is always a physical interaction (and all physical interactions are quantum mechanical in nature).” Further limitations of Classical Mathematical Logic In addition to the inability to implement concurrent computation, the semantics of mathematical logic suffers from difficulties including unruly combinatorics and the semantic failure of classical proof theory and model theory in the face of inconsistency as discussed below. Unruly combinatorics General mathematical theorem proving has been intractable in practice although verification has been more successful. Semantic failure of classical proof theory and model theory in the face of inconsistency Claim: All very large knowledge bases about human information system interactions are inconsistent. In the face of inconsistency, classical mathematical logic fails, e.g., • Proof theory fails because everything can be proved: If Ψ is inconsistent, then ∀Ω Ψ ⊢ Ω • Model theory fails because there are no models: If Ψ is inconsistent, then ¬∃M ⊢ M Ψ Irrelevance Classical mathematical logic allows many irrelevant derivations, e.g., ⊢ ((P ∧ ¬P) ⇒ Q), ⊢ (P⇒Q ∨ Q⇒R), and ⊢ (P ⇒ (P ∨ Q))
منابع مشابه
A Critical Examination of Ibn-Sina’s Theory of the Conditional Syllogism
This paper will examine Ibn Sina’s theory of the Conditional Syllogism from a purely logical point of view, and will lay bare the principles he adopted for founding his theory, and the reason why the newly introduced part of his logic remained undeveloped and eventually was removed from the texts of logic in the later Islamic tradition. As a preliminary discussion, this paper briefly examines I...
متن کاملWhy Even the Logic of Re-Defined Choice May Still Contradict the Logic of Care in Public Health Systems?
متن کامل
Application of qualitative research in management (why, when and how)
Application of qualitative research in management (why, when and how) Qualitative research has been increasingly used in all sciences. In this paper we will discuss about the applications of qualitative research methods in management sciences. The differences between quantitative and qualitative researches will be clarified and the statistical methods which are suitable for such researches will...
متن کاملDevelopment of a Spatial Model for Locating Optimal Areas of Sustainable Physical Development Using Fuzzy Logic (Case Study: Hamadan City)
Today, physical development and population growth in Iranian cities, like other developing countries, is on the rise. One of the main problems in the urban area is the lack of attention to the influential parameters in the sustainable urban development. Various factors, such as natural phenomena, play a role in the urban development, and the effective parameters must be considered for locatin...
متن کاملDesigning an Intelligent Intrusion Detection System in the Electronic Banking Industry Using Fuzzy Logic
One of the most important obstacles to using Internet banking is the lack of Stability of transactions and some misuse in the course of transactions it is financial. That is why preventing unauthorized access Crime detection is one of the major issues in financial institutions and banks. In this article, a system of intelligence has been designed that recognizes Suspicious and unusual behaviors...
متن کاملA GIS-based integrative approach for land use optimization in a semi-arid watershed
The proper use of natural resources can preserve these valuable assets. In line with the management of natural resources, land use optimization can be highly useful. The aim of the present study is to propose an appropriate integrative model for optimized allocation of lands for surface runoff and sediment load minimization and net income maximization in Bayg watershed, Iran. In this study, fiv...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2006